/ Assembly List / LJCNetCommon / TextBuilder / GetIndented

Namespace - LJCNetCommon


Parameters
text - The add text.

Returns

The potentially indented new text value.

Syntax

C#
public String GetIndented(String text)

Gets a new potentially indented line.

Example

C#
// Defaults: IndentCharCount = 2, LineLimit = 80, WrapEnabled = false.
var tb = new TextBuilder();

// Example Method:
var result = tb.GetIndented("This text is NOT indented.");

// The builder keeps track of the current number of indents.
tb.AddIndent(2);
result += tb.GetLine();
result += tb.GetIndented("This text is indented.");

// result:
// This text is NOT indented.
//     This text is indented.

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.